package com.example.siyun.service.impl.microserviceimpl;

import com.example.siyun.mapper.micromapper.MicroListMapper;
import com.example.siyun.pojo.Micro;
import com.example.siyun.service.microservice.MicroListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
/**
 * @Auther: 全
 * @Date: 2022/9/26 09:33
 * @Description:教师列表微圈列表
 */
@Service
public class MicroListServiceImpl implements MicroListService {
    @Autowired
    private MicroListMapper microListMapper;
    /**
     * 获取微圈信息
     * @return 返回微圈信息
     */
    @Transactional
    @Override
    public List<Micro> getMicroList(Micro micro,int isdel) {
        return microListMapper.getMicroList(micro,isdel);
    }
    /**
     * 通过id删除微圈信息
     * @param id 要删除微圈的id
     */
    @Transactional
    @Override
    public void delMicroList(int id) {
        microListMapper.delMicroList(id);
    }
    /**
     * 通过id查询对应的微圈信息
     * @param id 要查询微圈的id
     * @ruturn 返回查询出来的微圈信息
     */
    @Transactional
    @Override
    public Micro selectMicroById(int id) {
        return microListMapper.selectMicroById(id);
    }
}
